package com.bit.book.service;

import com.bit.book.Mapper.UserMapper;
import com.bit.book.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public Boolean checkPassword(String name, String password) {
        UserInfo userInfo = userMapper.checkUser(name);
        if(userInfo == null){
            return false;
        }else if(password.equals(userInfo.getPassword())){
            return true;
        }
        return false;
    }
}
